home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 6 / The Arsenal Files 6 (Arsenal Computer).ISO / prg_casm / jlvesa11.zip / JLFONT00.CPP < prev    next >
Text File  |  1995-11-22  |  679b  |  32 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include "jlvesa.h"
  4.  
  5. JVFont *jlfont_font;
  6.  
  7. void JVFont_Select(JVFont *font)
  8. {
  9.    jlfont_font=font;
  10. }
  11.  
  12. void JVText_Draw(int x,int y,char *string)
  13. {
  14.    int character,pointer=0,tx;
  15.    JVUWord offset;
  16.  
  17.    tx=x;
  18.    while((character=*(string+pointer++))!=0)
  19.    {
  20.       offset=jlfont_font->offset[character];
  21.       if(offset!=0xFFFFu)
  22.       {
  23.          JVImage_DrawOn(tx,y,*(jlfont_font->font_data+offset),
  24.                         jlfont_font->height,
  25.                         jlfont_font->font_data+offset+1);
  26.          tx+=*(jlfont_font->font_data+offset);
  27.       }
  28.       else
  29.          tx+=jlfont_font->width;
  30.    }
  31. }
  32.